function [bitPopulation] = hw8PopDecToBin(population, newGenerationSize, numBits)
[numPop, popSize] = size(population);
bitPopulation = zeros(numPop, newGenerationSize);
for i=1:numPop
    k = 1;
    for j=1:popSize
        from = k;
        to = k+numBits-1;
        % convert binary to decimal
        bitPopulation(i,from:to) = dec2bin(population(i,j)-1,numBits) - '0';
        k = to+1;
    end
end
